<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE PatternSynonyms #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">{-
(c) The AQUA Project, Glasgow University, 1993-1998

\section[GHC.Core.Opt.Simplify.Monad]{The simplifier Monad}
-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-9"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.Opt.Simplify.Monad</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-10"></span><span>        </span><span class="hs-comment">-- The monad</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier">SimplM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#initSmpl"><span class="hs-identifier">initSmpl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#traceSmpl"><span class="hs-identifier">traceSmpl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplRules"><span class="hs-identifier">getSimplRules</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getFamEnvs"><span class="hs-identifier">getFamEnvs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span>        </span><span class="hs-comment">-- Unique supply</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#MonadUnique"><span class="hs-identifier">MonadUnique</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#newId"><span class="hs-identifier">newId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#newJoinId"><span class="hs-identifier">newJoinId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>        </span><span class="hs-comment">-- Counting</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier">SimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#tick"><span class="hs-identifier">tick</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#freeTick"><span class="hs-identifier">freeTick</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#checkedTick"><span class="hs-identifier">checkedTick</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplCount"><span class="hs-identifier">getSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier">zeroSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier">pprSimplCount</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier">plusSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#isZeroSimplCount"><span class="hs-identifier">isZeroSimplCount</span></a></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isId"><span class="hs-identifier">isId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#mkLocalVar"><span class="hs-identifier">mkLocalVar</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier">mkSystemVarName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier">mkSysLocalOrCoVar</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html"><span class="hs-identifier">GHC.Types.Id.Info</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdDetails"><span class="hs-identifier">IdDetails</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier">vanillaIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-identifier">setArityInfo</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier">Type</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier">Mult</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier">FamInstEnv</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>            </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleEnv"><span class="hs-identifier">RuleEnv</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html#mkLamTypes"><span class="hs-identifier">mkLamTypes</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html"><span class="hs-identifier">GHC.Core.Opt.Monad</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.html"><span class="hs-identifier">GHC.Utils.Monad</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Err</span></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier">count</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html"><span class="hs-identifier">GHC.Utils.Panic</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Panic.html#throwGhcExceptionIO"><span class="hs-identifier">throwGhcExceptionIO</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html#GhcException"><span class="hs-identifier">GhcException</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>     </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#IntWithInf"><span class="hs-identifier">IntWithInf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#treatZeroAsInf"><span class="hs-identifier">treatZeroAsInf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#mkIntWithInf"><span class="hs-identifier">mkIntWithInf</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier">ap</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="hs-keyword">pattern</span><span> </span><span class="annot"><a href="GHC.Core.Type.html#Many"><span class="hs-identifier">Many</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><span class="hs-identifier">oneShot</span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Monad plumbing}
*                                                                      *
************************************************************************

For the simplifier monad, we want to {\em thread} a unique supply and a counter.
(Command-line switches move around through the explicitly-passed SimplEnv.)
-}</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">newtype</span><span> </span><span id="SimplM"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-var">SimplM</span></a></span></span><span> </span><span id="local-6989586621680958368"><span class="annot"><a href="#local-6989586621680958368"><span class="hs-identifier hs-type">result</span></a></span></span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span id="SM%27"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SM%27"><span class="hs-identifier hs-var">SM'</span></a></span></span><span>  </span><span class="hs-special">{</span><span> </span><span id="unSM"><span class="annot"><span class="annottext">forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplTopEnv"><span class="hs-identifier hs-type">SimplTopEnv</span></a></span><span>  </span><span class="hs-comment">-- Envt that does not change much</span><span>
</span><span id="line-61"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>   </span><span class="hs-comment">-- We thread the unique supply because</span><span>
</span><span id="line-62"></span><span>                                 </span><span class="hs-comment">-- constantly splitting it is rather expensive</span><span>
</span><span id="line-63"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-64"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680958368"><span class="hs-identifier hs-type">result</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-65"></span><span>    </span><span class="hs-comment">-- We only need IO here for dump output</span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680958208"><span id="local-6989586621680958212"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; SimplM a -&gt; SimplM b)
-&gt; (forall a b. a -&gt; SimplM b -&gt; SimplM a) -&gt; Functor SimplM
forall a b. a -&gt; SimplM b -&gt; SimplM a
forall a b. (a -&gt; b) -&gt; SimplM a -&gt; SimplM b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; SimplM b -&gt; SimplM a
$c&lt;$ :: forall a b. a -&gt; SimplM b -&gt; SimplM a
fmap :: forall a b. (a -&gt; b) -&gt; SimplM a -&gt; SimplM b
$cfmap :: forall a b. (a -&gt; b) -&gt; SimplM a -&gt; SimplM b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span id="local-6989586621680958358"><span class="hs-keyword">pattern</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-type">SM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplTopEnv"><span class="hs-identifier hs-type">SimplTopEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-69"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680958358"><span class="hs-identifier hs-type">result</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958358"><span class="hs-identifier hs-type">result</span></a></span></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- This pattern synonym makes the simplifier monad eta-expand,</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- which as a very beneficial effect on compiler performance</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- (worth a 1-2% reduction in bytes-allocated).  See #18202.</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- See Note [The one-shot state monad trick] in GHC.Core.Unify</span><span>
</span><span id="line-75"></span><span class="hs-keyword">pattern</span><span> </span><span id="%24mSM"><span id="%24bSM"><span id="SM"><span class="annot"><span class="annottext">$mSM :: forall {r} {result}.
SimplM result
-&gt; ((SimplTopEnv
     -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
    -&gt; r)
-&gt; (Void# -&gt; r)
-&gt; r
$bSM :: forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#%24mSM"><span class="hs-identifier hs-var hs-var hs-var hs-var">SM</span></a></span></span></span></span><span> </span><span class="annot"><a href="#local-6989586621680958201"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SM%27"><span class="hs-identifier hs-type">SM'</span></a></span><span> </span><span id="local-6989586621680958201"><span class="annot"><a href="#local-6989586621680958201"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-76"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-77"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span id="local-6989586621680958200"><span class="annot"><span class="annottext">SimplTopEnv
-&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount)
</span><a href="#local-6989586621680958200"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM%27"><span class="hs-identifier hs-var">SM'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><span class="hs-identifier hs-var">oneShot</span></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
-&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount)
</span><a href="#local-6989586621680958200"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-keyword">data</span><span> </span><span id="SimplTopEnv"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplTopEnv"><span class="hs-identifier hs-var">SimplTopEnv</span></a></span></span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="STE"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#STE"><span class="hs-identifier hs-var">STE</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="st_flags"><span class="annot"><span class="annottext">SimplTopEnv -&gt; DynFlags
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_flags"><span class="hs-identifier hs-var hs-var">st_flags</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="st_max_ticks"><span class="annot"><span class="annottext">SimplTopEnv -&gt; IntWithInf
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_max_ticks"><span class="hs-identifier hs-var hs-var">st_max_ticks</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#IntWithInf"><span class="hs-identifier hs-type">IntWithInf</span></a></span><span>  </span><span class="hs-comment">-- Max #ticks in this simplifier run</span><span>
</span><span id="line-82"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="st_rules"><span class="annot"><span class="annottext">SimplTopEnv -&gt; RuleEnv
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_rules"><span class="hs-identifier hs-var hs-var">st_rules</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleEnv"><span class="hs-identifier hs-type">RuleEnv</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="st_fams"><span class="annot"><span class="annottext">SimplTopEnv -&gt; (FamInstEnv, FamInstEnv)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_fams"><span class="hs-identifier hs-var hs-var">st_fams</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span id="local-6989586621680958347"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#initSmpl"><span class="hs-identifier hs-type">initSmpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleEnv"><span class="hs-identifier hs-type">RuleEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>          </span><span class="hs-comment">-- No init count; set to 0</span><span>
</span><span id="line-87"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                 </span><span class="hs-comment">-- Size of the bindings, used to limit</span><span>
</span><span id="line-88"></span><span>                                </span><span class="hs-comment">-- the number of ticks we allow</span><span>
</span><span id="line-89"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958347"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-90"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680958347"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span id="initSmpl"><span class="annot"><span class="annottext">initSmpl :: forall a.
DynFlags
-&gt; RuleEnv
-&gt; (FamInstEnv, FamInstEnv)
-&gt; UniqSupply
-&gt; Int
-&gt; SimplM a
-&gt; IO (a, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#initSmpl"><span class="hs-identifier hs-var hs-var">initSmpl</span></a></span></span><span> </span><span id="local-6989586621680958192"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958192"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680958191"><span class="annot"><span class="annottext">RuleEnv
</span><a href="#local-6989586621680958191"><span class="hs-identifier hs-var">rules</span></a></span></span><span> </span><span id="local-6989586621680958190"><span class="annot"><span class="annottext">(FamInstEnv, FamInstEnv)
</span><a href="#local-6989586621680958190"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span id="local-6989586621680958189"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958189"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958188"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958188"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span id="local-6989586621680958187"><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958187"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680958186"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958186"><span class="hs-identifier hs-var">result</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958185"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958185"><span class="hs-identifier hs-var">count</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM a
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (a, UniqSupply, SimplCount)
forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span><span> </span><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958187"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958184"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958189"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier hs-var">zeroSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958192"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>       </span><span class="annot"><span class="annottext">(a, SimplCount) -&gt; IO (a, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958186"><span class="hs-identifier hs-var">result</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958185"><span class="hs-identifier hs-var">count</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-96"></span><span>    </span><span id="local-6989586621680958184"><span class="annot"><span class="annottext">env :: SimplTopEnv
</span><a href="#local-6989586621680958184"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STE :: DynFlags
-&gt; IntWithInf -&gt; RuleEnv -&gt; (FamInstEnv, FamInstEnv) -&gt; SimplTopEnv
</span><a href="GHC.Core.Opt.Simplify.Monad.html#STE"><span class="hs-identifier hs-type">STE</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">st_flags :: DynFlags
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_flags"><span class="hs-identifier hs-var">st_flags</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958192"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">st_rules :: RuleEnv
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_rules"><span class="hs-identifier hs-var">st_rules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleEnv
</span><a href="#local-6989586621680958191"><span class="hs-identifier hs-var">rules</span></a></span><span>
</span><span id="line-97"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">st_max_ticks :: IntWithInf
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_max_ticks"><span class="hs-identifier hs-var">st_max_ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int -&gt; IntWithInf
</span><a href="GHC.Core.Opt.Simplify.Monad.html#computeMaxTicks"><span class="hs-identifier hs-var">computeMaxTicks</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958192"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958188"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-98"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">st_fams :: (FamInstEnv, FamInstEnv)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_fams"><span class="hs-identifier hs-var">st_fams</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FamInstEnv, FamInstEnv)
</span><a href="#local-6989586621680958190"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#computeMaxTicks"><span class="hs-identifier hs-type">computeMaxTicks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#IntWithInf"><span class="hs-identifier hs-type">IntWithInf</span></a></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- Compute the max simplifier ticks as</span><span>
</span><span id="line-102"></span><span class="hs-comment">--     (base-size + pgm-size) * magic-multiplier * tick-factor/100</span><span>
</span><span id="line-103"></span><span class="hs-comment">-- where</span><span>
</span><span id="line-104"></span><span class="hs-comment">--    magic-multiplier is a constant that gives reasonable results</span><span>
</span><span id="line-105"></span><span class="hs-comment">--    base-size is a constant to deal with size-zero programs</span><span>
</span><span id="line-106"></span><span id="computeMaxTicks"><span class="annot"><span class="annottext">computeMaxTicks :: DynFlags -&gt; Int -&gt; IntWithInf
</span><a href="GHC.Core.Opt.Simplify.Monad.html#computeMaxTicks"><span class="hs-identifier hs-var hs-var">computeMaxTicks</span></a></span></span><span> </span><span id="local-6989586621680958182"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958182"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680958181"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958181"><span class="hs-identifier hs-var">size</span></a></span></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntWithInf
</span><a href="GHC.Types.Basic.html#treatZeroAsInf"><span class="hs-identifier hs-var">treatZeroAsInf</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; IntWithInf) -&gt; Int -&gt; IntWithInf
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-108"></span><span>    </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958181"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958179"><span class="hs-identifier hs-var">base_size</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>                  </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958177"><span class="hs-identifier hs-var">tick_factor</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958176"><span class="hs-identifier hs-var">magic_multiplier</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>          </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#div"><span class="hs-operator hs-var">`div`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">100</span></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-112"></span><span>    </span><span id="local-6989586621680958177"><span class="annot"><span class="annottext">tick_factor :: Int
</span><a href="#local-6989586621680958177"><span class="hs-identifier hs-var hs-var">tick_factor</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#simplTickFactor"><span class="hs-identifier hs-var hs-var">simplTickFactor</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958182"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621680958179"><span class="annot"><span class="annottext">base_size :: Int
</span><a href="#local-6989586621680958179"><span class="hs-identifier hs-var hs-var">base_size</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">100</span></span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621680958176"><span class="annot"><span class="annottext">magic_multiplier :: Int
</span><a href="#local-6989586621680958176"><span class="hs-identifier hs-var hs-var">magic_multiplier</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">40</span></span><span>
</span><span id="line-115"></span><span>        </span><span class="hs-comment">-- MAGIC NUMBER, multiplies the simplTickFactor</span><span>
</span><span id="line-116"></span><span>        </span><span class="hs-comment">-- We can afford to be generous; this is really</span><span>
</span><span id="line-117"></span><span>        </span><span class="hs-comment">-- just checking for loops, and shouldn't usually fire</span><span>
</span><span id="line-118"></span><span>        </span><span class="hs-comment">-- A figure of 20 was too small: see #5539.</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl"><span class="hs-pragma hs-type">thenSmpl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-121"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl_"><span class="hs-pragma hs-type">thenSmpl_</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-122"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#returnSmpl"><span class="hs-pragma hs-type">returnSmpl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680958160"><span id="local-6989586621680958163"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621680958158"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; SimplM a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; SimplM a
forall a. a -&gt; SimplM a
</span><a href="GHC.Core.Opt.Simplify.Monad.html#returnSmpl"><span class="hs-identifier hs-var">returnSmpl</span></a></span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621680958156"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. SimplM (a -&gt; b) -&gt; SimplM a -&gt; SimplM b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplM (a -&gt; b) -&gt; SimplM a -&gt; SimplM b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span id="local-6989586621680958155"><span class="annot"><span class="annottext">*&gt; :: forall a b. SimplM a -&gt; SimplM b -&gt; SimplM b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(*&gt;)</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplM a -&gt; SimplM b -&gt; SimplM b
forall a b. SimplM a -&gt; SimplM b -&gt; SimplM b
</span><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl_"><span class="hs-identifier hs-var">thenSmpl_</span></a></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680958149"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-131"></span><span>   </span><span id="local-6989586621680958146"><span class="annot"><span class="annottext">&gt;&gt; :: forall a b. SimplM a -&gt; SimplM b -&gt; SimplM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&gt;&gt;)</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplM a -&gt; SimplM b -&gt; SimplM b
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span>
</span><span id="line-132"></span><span>   </span><span id="local-6989586621680958145"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. SimplM a -&gt; (a -&gt; SimplM b) -&gt; SimplM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">(&gt;&gt;=)</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplM a -&gt; (a -&gt; SimplM b) -&gt; SimplM b
forall a b. SimplM a -&gt; (a -&gt; SimplM b) -&gt; SimplM b
</span><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl"><span class="hs-identifier hs-var">thenSmpl</span></a></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span id="local-6989586621680958144"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#returnSmpl"><span class="hs-identifier hs-type">returnSmpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680958144"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958144"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-135"></span><span id="returnSmpl"><span class="annot"><span class="annottext">returnSmpl :: forall a. a -&gt; SimplM a
</span><a href="GHC.Core.Opt.Simplify.Monad.html#returnSmpl"><span class="hs-identifier hs-var hs-var">returnSmpl</span></a></span></span><span> </span><span id="local-6989586621680958142"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958142"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (a, UniqSupply, SimplCount))
-&gt; SimplM a
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958141"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958141"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958140"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958140"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958139"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958139"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(a, UniqSupply, SimplCount) -&gt; IO (a, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958142"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958140"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958139"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span id="local-6989586621680958137"><span id="local-6989586621680958138"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl"><span class="hs-identifier hs-type">thenSmpl</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958138"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680958138"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958137"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958137"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-138"></span><span id="local-6989586621680958135"><span id="local-6989586621680958136"><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl_"><span class="hs-identifier hs-type">thenSmpl_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958136"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958135"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680958135"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span id="thenSmpl"><span class="annot"><span class="annottext">thenSmpl :: forall a b. SimplM a -&gt; (a -&gt; SimplM b) -&gt; SimplM b
</span><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl"><span class="hs-identifier hs-var hs-var">thenSmpl</span></a></span></span><span> </span><span id="local-6989586621680958133"><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958133"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680958132"><span class="annot"><span class="annottext">a -&gt; SimplM b
</span><a href="#local-6989586621680958132"><span class="hs-identifier hs-var">k</span></a></span></span><span>
</span><span id="line-141"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
-&gt; SimplM b
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="annot"><span class="annottext">((SimplTopEnv
  -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
 -&gt; SimplM b)
-&gt; (SimplTopEnv
    -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
-&gt; SimplM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680958131"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958131"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958130"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958130"><span class="hs-identifier hs-var">us0</span></a></span></span><span> </span><span id="local-6989586621680958129"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958129"><span class="hs-identifier hs-var">sc0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-142"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680958128"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958128"><span class="hs-identifier hs-var">m_result</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958127"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958127"><span class="hs-identifier hs-var">us1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958126"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958126"><span class="hs-identifier hs-var">sc1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM a
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (a, UniqSupply, SimplCount)
forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span><span> </span><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958133"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958131"><span class="hs-identifier hs-var">st_env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958130"><span class="hs-identifier hs-var">us0</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958129"><span class="hs-identifier hs-var">sc0</span></a></span><span>
</span><span id="line-143"></span><span>      </span><span class="annot"><span class="annottext">SimplM b
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (b, UniqSupply, SimplCount)
forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SimplM b
</span><a href="#local-6989586621680958132"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958128"><span class="hs-identifier hs-var">m_result</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958131"><span class="hs-identifier hs-var">st_env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958127"><span class="hs-identifier hs-var">us1</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958126"><span class="hs-identifier hs-var">sc1</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span id="thenSmpl_"><span class="annot"><span class="annottext">thenSmpl_ :: forall a b. SimplM a -&gt; SimplM b -&gt; SimplM b
</span><a href="GHC.Core.Opt.Simplify.Monad.html#thenSmpl_"><span class="hs-identifier hs-var hs-var">thenSmpl_</span></a></span></span><span> </span><span id="local-6989586621680958124"><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958124"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680958123"><span class="annot"><span class="annottext">SimplM b
</span><a href="#local-6989586621680958123"><span class="hs-identifier hs-var">k</span></a></span></span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
-&gt; SimplM b
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="annot"><span class="annottext">((SimplTopEnv
  -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
 -&gt; SimplM b)
-&gt; (SimplTopEnv
    -&gt; UniqSupply -&gt; SimplCount -&gt; IO (b, UniqSupply, SimplCount))
-&gt; SimplM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680958122"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958122"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958121"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958121"><span class="hs-identifier hs-var">us0</span></a></span></span><span> </span><span id="local-6989586621680958120"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958120"><span class="hs-identifier hs-var">sc0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-147"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958119"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958119"><span class="hs-identifier hs-var">us1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958118"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958118"><span class="hs-identifier hs-var">sc1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM a
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (a, UniqSupply, SimplCount)
forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span><span> </span><span class="annot"><span class="annottext">SimplM a
</span><a href="#local-6989586621680958124"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958122"><span class="hs-identifier hs-var">st_env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958121"><span class="hs-identifier hs-var">us0</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958120"><span class="hs-identifier hs-var">sc0</span></a></span><span>
</span><span id="line-148"></span><span>      </span><span class="annot"><span class="annottext">SimplM b
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (b, UniqSupply, SimplCount)
forall result.
SimplM result
-&gt; SimplTopEnv
-&gt; UniqSupply
-&gt; SimplCount
-&gt; IO (result, UniqSupply, SimplCount)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#unSM"><span class="hs-identifier hs-var hs-var">unSM</span></a></span><span> </span><span class="annot"><span class="annottext">SimplM b
</span><a href="#local-6989586621680958123"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958122"><span class="hs-identifier hs-var">st_env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958119"><span class="hs-identifier hs-var">us1</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958118"><span class="hs-identifier hs-var">sc1</span></a></span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">-- TODO: this specializing is not allowed</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- {-# SPECIALIZE mapM         :: (a -&gt; SimplM b) -&gt; [a] -&gt; SimplM [b] #-}</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- {-# SPECIALIZE mapAndUnzipM :: (a -&gt; SimplM (b, c)) -&gt; [a] -&gt; SimplM ([b],[c]) #-}</span><span>
</span><span id="line-153"></span><span class="hs-comment">-- {-# SPECIALIZE mapAccumLM   :: (acc -&gt; b -&gt; SimplM (acc,c)) -&gt; acc -&gt; [b] -&gt; SimplM (acc, [c]) #-}</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#traceSmpl"><span class="hs-identifier hs-type">traceSmpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span id="traceSmpl"><span class="annot"><span class="annottext">traceSmpl :: String -&gt; SDoc -&gt; SimplM ()
</span><a href="GHC.Core.Opt.Simplify.Monad.html#traceSmpl"><span class="hs-identifier hs-var hs-var">traceSmpl</span></a></span></span><span> </span><span id="local-6989586621680958117"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680958117"><span class="hs-identifier hs-var">herald</span></a></span></span><span> </span><span id="local-6989586621680958116"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680958116"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680958115"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958115"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-158"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; SimplM ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; SimplM ()) -&gt; IO () -&gt; SimplM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">Err.dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680958115"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_simpl_trace"><span class="hs-identifier hs-var">Opt_D_dump_simpl_trace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Simpl Trace&quot;</span></span><span>
</span><span id="line-159"></span><span>           </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-160"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680958117"><span class="hs-identifier hs-var">herald</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680958116"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-161"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#traceSmpl"><span class="hs-pragma hs-type">traceSmpl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>  </span><span class="hs-comment">-- see Note [INLINE conditional tracing utilities]</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{The unique supply}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#MonadUnique"><span class="hs-identifier hs-type">MonadUnique</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-172"></span><span>    </span><span id="local-6989586621680958100"><span class="annot"><span class="annottext">getUniqueSupplyM :: SimplM UniqSupply
</span><a href="GHC.Types.Unique.Supply.html#getUniqueSupplyM"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUniqueSupplyM</span></a></span></span><span>
</span><span id="line-173"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO (UniqSupply, UniqSupply, SimplCount))
-&gt; SimplM UniqSupply
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958098"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958098"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958097"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958097"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958096"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958096"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (UniqSupply, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#splitUniqSupply"><span class="hs-identifier hs-var">splitUniqSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958097"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-174"></span><span>                                </span><span class="hs-special">(</span><span id="local-6989586621680958094"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958094"><span class="hs-identifier hs-var">us1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958093"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958093"><span class="hs-identifier hs-var">us2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(UniqSupply, UniqSupply, SimplCount)
-&gt; IO (UniqSupply, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958094"><span class="hs-identifier hs-var">us1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958093"><span class="hs-identifier hs-var">us2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958096"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621680958091"><span class="annot"><span class="annottext">getUniqueM :: SimplM Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUniqueM</span></a></span></span><span>
</span><span id="line-177"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (Unique, UniqSupply, SimplCount))
-&gt; SimplM Unique
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958089"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958089"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958088"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958088"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958087"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958087"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (Unique, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#takeUniqFromSupply"><span class="hs-identifier hs-var">takeUniqFromSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958088"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-178"></span><span>                                </span><span class="hs-special">(</span><span id="local-6989586621680958085"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958085"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958084"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958084"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Unique, UniqSupply, SimplCount)
-&gt; IO (Unique, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958085"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958084"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958087"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>    </span><span id="local-6989586621680958082"><span class="annot"><span class="annottext">getUniquesM :: SimplM [Unique]
</span><a href="GHC.Types.Unique.Supply.html#getUniquesM"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUniquesM</span></a></span></span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO ([Unique], UniqSupply, SimplCount))
-&gt; SimplM [Unique]
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958080"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958080"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958079"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958079"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958078"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958078"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (UniqSupply, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#splitUniqSupply"><span class="hs-identifier hs-var">splitUniqSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958079"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-182"></span><span>                                </span><span class="hs-special">(</span><span id="local-6989586621680958077"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958077"><span class="hs-identifier hs-var">us1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680958076"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958076"><span class="hs-identifier hs-var">us2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([Unique], UniqSupply, SimplCount)
-&gt; IO ([Unique], UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqSupply -&gt; [Unique]
</span><a href="GHC.Types.Unique.Supply.html#uniqsFromSupply"><span class="hs-identifier hs-var">uniqsFromSupply</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958077"><span class="hs-identifier hs-var">us1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958076"><span class="hs-identifier hs-var">us2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958078"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#HasDynFlags"><span class="hs-identifier hs-type">HasDynFlags</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621680958071"><span class="annot"><span class="annottext">getDynFlags :: SimplM DynFlags
</span><a href="#local-6989586621680958071"><span class="hs-identifier hs-var hs-var hs-var hs-var">getDynFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO (DynFlags, UniqSupply, SimplCount))
-&gt; SimplM DynFlags
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958070"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958070"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958069"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958069"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958068"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958068"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(DynFlags, UniqSupply, SimplCount)
-&gt; IO (DynFlags, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplTopEnv -&gt; DynFlags
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_flags"><span class="hs-identifier hs-var hs-var">st_flags</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958070"><span class="hs-identifier hs-var">st_env</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958069"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958068"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-188"></span><span>    </span><span id="local-6989586621680958061"><span class="annot"><span class="annottext">liftIO :: forall a. IO a -&gt; SimplM a
</span><a href="#local-6989586621680958061"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftIO</span></a></span></span><span> </span><span id="local-6989586621680958060"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621680958060"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (a, UniqSupply, SimplCount))
-&gt; SimplM a
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="annot"><span class="annottext">((SimplTopEnv
  -&gt; UniqSupply -&gt; SimplCount -&gt; IO (a, UniqSupply, SimplCount))
 -&gt; SimplM a)
-&gt; (SimplTopEnv
    -&gt; UniqSupply -&gt; SimplCount -&gt; IO (a, UniqSupply, SimplCount))
-&gt; SimplM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">SimplTopEnv
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680958059"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958059"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958058"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958058"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-189"></span><span>      </span><span id="local-6989586621680958057"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958057"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621680958060"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-190"></span><span>      </span><span class="annot"><span class="annottext">(a, UniqSupply, SimplCount) -&gt; IO (a, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680958057"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958059"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958058"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplRules"><span class="hs-identifier hs-type">getSimplRules</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#RuleEnv"><span class="hs-identifier hs-type">RuleEnv</span></a></span><span>
</span><span id="line-193"></span><span id="getSimplRules"><span class="annot"><span class="annottext">getSimplRules :: SimplM RuleEnv
</span><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplRules"><span class="hs-identifier hs-var hs-var">getSimplRules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO (RuleEnv, UniqSupply, SimplCount))
-&gt; SimplM RuleEnv
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958056"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958056"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958055"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958055"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958054"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958054"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(RuleEnv, UniqSupply, SimplCount)
-&gt; IO (RuleEnv, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplTopEnv -&gt; RuleEnv
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_rules"><span class="hs-identifier hs-var hs-var">st_rules</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958056"><span class="hs-identifier hs-var">st_env</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958055"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958054"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getFamEnvs"><span class="hs-identifier hs-type">getFamEnvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnv"><span class="hs-identifier hs-type">FamInstEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span id="getFamEnvs"><span class="annot"><span class="annottext">getFamEnvs :: SimplM (FamInstEnv, FamInstEnv)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#getFamEnvs"><span class="hs-identifier hs-var hs-var">getFamEnvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO ((FamInstEnv, FamInstEnv), UniqSupply, SimplCount))
-&gt; SimplM (FamInstEnv, FamInstEnv)
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958053"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958053"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958052"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958052"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958051"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958051"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">((FamInstEnv, FamInstEnv), UniqSupply, SimplCount)
-&gt; IO ((FamInstEnv, FamInstEnv), UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplTopEnv -&gt; (FamInstEnv, FamInstEnv)
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_fams"><span class="hs-identifier hs-var hs-var">st_fams</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958053"><span class="hs-identifier hs-var">st_env</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958052"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958051"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#newId"><span class="hs-identifier hs-type">newId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-199"></span><span id="newId"><span class="annot"><span class="annottext">newId :: FastString -&gt; Mult -&gt; Mult -&gt; SimplM Id
</span><a href="GHC.Core.Opt.Simplify.Monad.html#newId"><span class="hs-identifier hs-var hs-var">newId</span></a></span></span><span> </span><span id="local-6989586621680958050"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680958050"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680958049"><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958049"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680958048"><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958048"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680958047"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958047"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span>
</span><span id="line-200"></span><span>                   </span><span class="annot"><span class="annottext">Id -&gt; SimplM Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Mult -&gt; Mult -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-var">mkSysLocalOrCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680958050"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958047"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958049"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958048"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#newJoinId"><span class="hs-identifier hs-type">newJoinId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-203"></span><span id="newJoinId"><span class="annot"><span class="annottext">newJoinId :: [Id] -&gt; Mult -&gt; SimplM Id
</span><a href="GHC.Core.Opt.Simplify.Monad.html#newJoinId"><span class="hs-identifier hs-var hs-var">newJoinId</span></a></span></span><span> </span><span id="local-6989586621680958046"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680958046"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span id="local-6989586621680958045"><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958045"><span class="hs-identifier hs-var">body_ty</span></a></span></span><span>
</span><span id="line-204"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680958044"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958044"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SimplM Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span>
</span><span id="line-205"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680958043"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680958043"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; FastString -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier hs-var">mkSystemVarName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680958044"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;$j&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>             </span><span id="local-6989586621680958041"><span class="annot"><span class="annottext">join_id_ty :: Mult
</span><a href="#local-6989586621680958041"><span class="hs-identifier hs-var hs-var">join_id_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Mult -&gt; Mult
</span><a href="GHC.Core.Utils.html#mkLamTypes"><span class="hs-identifier hs-var">mkLamTypes</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680958046"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958045"><span class="hs-identifier hs-var">body_ty</span></a></span><span>  </span><span class="hs-comment">-- Note [Funky mkLamTypes]</span><span>
</span><span id="line-207"></span><span>             </span><span id="local-6989586621680958040"><span class="annot"><span class="annottext">arity :: Int
</span><a href="#local-6989586621680958040"><span class="hs-identifier hs-var hs-var">arity</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Bool) -&gt; [Id] -&gt; Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Int
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680958046"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-208"></span><span>             </span><span class="hs-comment">-- arity: See Note [Invariants on join points] invariant 2b, in GHC.Core</span><span>
</span><span id="line-209"></span><span>             </span><span id="local-6989586621680958037"><span class="annot"><span class="annottext">join_arity :: Int
</span><a href="#local-6989586621680958037"><span class="hs-identifier hs-var hs-var">join_arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680958046"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-210"></span><span>             </span><span id="local-6989586621680958035"><span class="annot"><span class="annottext">details :: IdDetails
</span><a href="#local-6989586621680958035"><span class="hs-identifier hs-var hs-var">details</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#JoinId"><span class="hs-identifier hs-var">JoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958037"><span class="hs-identifier hs-var">join_arity</span></a></span><span>
</span><span id="line-211"></span><span>             </span><span id="local-6989586621680958033"><span class="annot"><span class="annottext">id_info :: IdInfo
</span><a href="#local-6989586621680958033"><span class="hs-identifier hs-var hs-var">id_info</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Int -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680958040"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-212"></span><span class="hs-comment">--                                        `setOccInfo` strongLoopBreaker</span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SimplM Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Mult -&gt; Mult -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkLocalVar"><span class="hs-identifier hs-var">mkLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="#local-6989586621680958035"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680958043"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Mult
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Mult
</span><a href="#local-6989586621680958041"><span class="hs-identifier hs-var">join_id_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680958033"><span class="hs-identifier hs-var">id_info</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Counting up what we've done}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplCount"><span class="hs-identifier hs-type">getSimplCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-225"></span><span id="getSimplCount"><span class="annot"><span class="annottext">getSimplCount :: SimplM SimplCount
</span><a href="GHC.Core.Opt.Simplify.Monad.html#getSimplCount"><span class="hs-identifier hs-var hs-var">getSimplCount</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply
 -&gt; SimplCount
 -&gt; IO (SimplCount, UniqSupply, SimplCount))
-&gt; SimplM SimplCount
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958032"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958032"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958031"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958031"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958030"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958030"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SimplCount, UniqSupply, SimplCount)
-&gt; IO (SimplCount, UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958030"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958031"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958030"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#tick"><span class="hs-identifier hs-type">tick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span id="tick"><span class="annot"><span class="annottext">tick :: Tick -&gt; SimplM ()
</span><a href="GHC.Core.Opt.Simplify.Monad.html#tick"><span class="hs-identifier hs-var hs-var">tick</span></a></span></span><span> </span><span id="local-6989586621680958029"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958029"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO ((), UniqSupply, SimplCount))
-&gt; SimplM ()
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958028"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958028"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958027"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958027"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958026"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958026"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680958025"><span class="annot"><span class="annottext">sc' :: SimplCount
</span><a href="#local-6989586621680958025"><span class="hs-identifier hs-var hs-var">sc'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Tick -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier hs-var">doSimplTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplTopEnv -&gt; DynFlags
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_flags"><span class="hs-identifier hs-var hs-var">st_flags</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958028"><span class="hs-identifier hs-var">st_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958029"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958026"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-229"></span><span>                              </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958025"><span class="hs-identifier hs-var">sc'</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
-&gt; IO ((), UniqSupply, SimplCount)
-&gt; IO ((), UniqSupply, SimplCount)
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">((), UniqSupply, SimplCount) -&gt; IO ((), UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958027"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958025"><span class="hs-identifier hs-var">sc'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#checkedTick"><span class="hs-identifier hs-type">checkedTick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- Try to take a tick, but fail if too many</span><span>
</span><span id="line-233"></span><span id="checkedTick"><span class="annot"><span class="annottext">checkedTick :: Tick -&gt; SimplM ()
</span><a href="GHC.Core.Opt.Simplify.Monad.html#checkedTick"><span class="hs-identifier hs-var hs-var">checkedTick</span></a></span></span><span> </span><span id="local-6989586621680958023"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958023"><span class="hs-identifier hs-var">t</span></a></span></span><span>
</span><span id="line-234"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO ((), UniqSupply, SimplCount))
-&gt; SimplM ()
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958022"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958022"><span class="hs-identifier hs-var">st_env</span></a></span></span><span> </span><span id="local-6989586621680958021"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958021"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680958020"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958020"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-235"></span><span>           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">SimplTopEnv -&gt; IntWithInf
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_max_ticks"><span class="hs-identifier hs-var hs-var">st_max_ticks</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958022"><span class="hs-identifier hs-var">st_env</span></a></span><span> </span><span class="annot"><span class="annottext">IntWithInf -&gt; IntWithInf -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; IntWithInf
</span><a href="GHC.Types.Basic.html#mkIntWithInf"><span class="hs-identifier hs-var">mkIntWithInf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#simplCountN"><span class="hs-identifier hs-var">simplCountN</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958020"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>           </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GhcException -&gt; IO ((), UniqSupply, SimplCount)
forall a. GhcException -&gt; IO a
</span><a href="GHC.Utils.Panic.html#throwGhcExceptionIO"><span class="hs-identifier hs-var">throwGhcExceptionIO</span></a></span><span> </span><span class="annot"><span class="annottext">(GhcException -&gt; IO ((), UniqSupply, SimplCount))
-&gt; GhcException -&gt; IO ((), UniqSupply, SimplCount)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-237"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; GhcException
</span><a href="GHC.Utils.Panic.html#PprProgramError"><span class="hs-identifier hs-var">PprProgramError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Simplifier ticks exhausted&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplCount -&gt; SDoc
</span><a href="#local-6989586621680958016"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958020"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>           </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680958015"><span class="annot"><span class="annottext">sc' :: SimplCount
</span><a href="#local-6989586621680958015"><span class="hs-identifier hs-var hs-var">sc'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Tick -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier hs-var">doSimplTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplTopEnv -&gt; DynFlags
</span><a href="GHC.Core.Opt.Simplify.Monad.html#st_flags"><span class="hs-identifier hs-var hs-var">st_flags</span></a></span><span> </span><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958022"><span class="hs-identifier hs-var">st_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958023"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958020"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-239"></span><span>                </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958015"><span class="hs-identifier hs-var">sc'</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
-&gt; IO ((), UniqSupply, SimplCount)
-&gt; IO ((), UniqSupply, SimplCount)
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">((), UniqSupply, SimplCount) -&gt; IO ((), UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958021"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958015"><span class="hs-identifier hs-var">sc'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-241"></span><span>    </span><span id="local-6989586621680958016"><span class="annot"><span class="annottext">msg :: SimplCount -&gt; SDoc
</span><a href="#local-6989586621680958016"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span> </span><span id="local-6989586621680958012"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958012"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-242"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;When trying&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958023"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-243"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;To increase the limit, use -fsimpl-tick-factor=N (default 100).&quot;</span></span><span>
</span><span id="line-244"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span>
</span><span id="line-245"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;If you need to increase the limit substantially, please file a&quot;</span></span><span>
</span><span id="line-246"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bug report and indicate the factor you needed.&quot;</span></span><span>
</span><span id="line-247"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span>
</span><span id="line-248"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;If GHC was unable to complete compilation even&quot;</span></span><span>
</span><span id="line-249"></span><span>               </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;with a very large factor&quot;</span></span><span>
</span><span id="line-250"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;(a thousand or more), please consult the&quot;</span></span><span>
</span><span id="line-251"></span><span>                </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Known bugs or infelicities&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;section in the Users Guide before filing a report. There are a&quot;</span></span><span>
</span><span id="line-253"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;few situations unlikely to occur in practical programs for which&quot;</span></span><span>
</span><span id="line-254"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;simplifier non-termination has been judged acceptable.&quot;</span></span><span>
</span><span id="line-255"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span>
</span><span id="line-256"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; SDoc
</span><a href="#local-6989586621680958006"><span class="hs-identifier hs-var">pp_details</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958012"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-257"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-var">pprSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958012"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-258"></span><span>    </span><span id="local-6989586621680958006"><span class="annot"><span class="annottext">pp_details :: SimplCount -&gt; SDoc
</span><a href="#local-6989586621680958006"><span class="hs-identifier hs-var hs-var">pp_details</span></a></span></span><span> </span><span id="local-6989586621680958005"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958005"><span class="hs-identifier hs-var">sc</span></a></span></span><span>
</span><span id="line-259"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#hasDetailedCounts"><span class="hs-identifier hs-var">hasDetailedCounts</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680958005"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-260"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;To see detailed counts use -ddump-simpl-stats&quot;</span></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#freeTick"><span class="hs-identifier hs-type">freeTick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Simplify.Monad.html#SimplM"><span class="hs-identifier hs-type">SimplM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- Record a tick, but don't add to the total tick count, which is</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- used to decide when nothing further has happened</span><span>
</span><span id="line-266"></span><span id="freeTick"><span class="annot"><span class="annottext">freeTick :: Tick -&gt; SimplM ()
</span><a href="GHC.Core.Opt.Simplify.Monad.html#freeTick"><span class="hs-identifier hs-var hs-var">freeTick</span></a></span></span><span> </span><span id="local-6989586621680958002"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958002"><span class="hs-identifier hs-var">t</span></a></span></span><span>
</span><span id="line-267"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO ((), UniqSupply, SimplCount))
-&gt; SimplM ()
forall result.
(SimplTopEnv
 -&gt; UniqSupply -&gt; SimplCount -&gt; IO (result, UniqSupply, SimplCount))
-&gt; SimplM result
</span><a href="GHC.Core.Opt.Simplify.Monad.html#SM"><span class="hs-identifier hs-var">SM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680958001"><span class="annot"><span class="annottext">SimplTopEnv
</span><a href="#local-6989586621680958001"><span class="hs-identifier hs-var">_st_env</span></a></span></span><span> </span><span id="local-6989586621680958000"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958000"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621680957999"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680957999"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680957998"><span class="annot"><span class="annottext">sc' :: SimplCount
</span><a href="#local-6989586621680957998"><span class="hs-identifier hs-var hs-var">sc'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#doFreeSimplTick"><span class="hs-identifier hs-var">doFreeSimplTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680958002"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680957999"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-268"></span><span>                           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680957998"><span class="hs-identifier hs-var">sc'</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
-&gt; IO ((), UniqSupply, SimplCount)
-&gt; IO ((), UniqSupply, SimplCount)
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">((), UniqSupply, SimplCount) -&gt; IO ((), UniqSupply, SimplCount)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621680958000"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680957998"><span class="hs-identifier hs-var">sc'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-269"></span></pre></body></html>